package org.example;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class GreetingService {

    private static final Logger logger = LoggerFactory.getLogger(GreetingService.class);

    public GreetingService() {
        logger.info("Creating GreetingService");
    }

    public String createGreeting(String name) {
        logger.info("Creating greeting for name: {}", name);
        if (name == null || name.isEmpty()) {
            return "Hello, Stranger!";
        }
        return "Hello, " + name + "!";
    }
}